<?php

class XPHEnum
{
    const Value = 0;
    const Caption = 1;
    const Remark = 2;
    const Alternate = 3;
    public $EnumTypes = array();
    //通过值获取内容
    function show($v){
        $CurCaption = "";
        foreach($this->EnumTypes as $temp){
            if($temp[self::Value] == $v){
                $CurCaption = $temp[self::Caption];
                break;
            }
        }
        return $CurCaption;
    }
    function showRemark($v){
        $CurRemark = "";
        foreach($this->EnumTypes as $temp){
            if($temp[self::Caption] == $v){
                $CurRemark = $temp[self::Remark];
                break;
            }
        }
        return $CurRemark;
    }

    function showAlternate($v){
        $CurAlternate = "";
        foreach($this->EnumTypes as $temp){
            if($temp[self::Caption] == $v){
                $CurAlternate = $temp[self::Alternate];
                break;
            }
        }
        return $CurAlternate;
    }

    function showByIndex($v,$index){
        $CurCaption = "";
        foreach($this->EnumTypes as $temp){
            if($temp[self::Value] == $v){
                $CurCaption = $temp[$index];
                break;
            }
        }
        return $CurCaption;
    }
    function getAll(){
        return $this->EnumTypes;
    }
    function getAllOneD(){
        $new_array=array();
        foreach($this->EnumTypes as $k=>$v){
            $new_array[]=$v[self::Caption];
        }
        return $new_array;
    }
    function getAllValue(){
        $new_array=array();
        foreach($this->EnumTypes as $k=>$v){
            $new_array[]=$v[self::Value];
        }
        return $new_array;
    }

}


class CommonWhether extends XPHEnum
{
	Const Whether = array("1",'是');
	Const Not = array("0",'否');

    function __construct(){
    	$this->EnumTypes = array(self::Whether,self::Not);
    }
}

class CommonStatus extends XPHEnum
{
    Const UnDeleted = array("1",'未删除');
    Const Deleted = array("0",'已删除');

    function __construct(){
        $this->EnumTypes = array(self::UnDeleted,self::Deleted);
    }
}

// 公共性别
class CommonGender extends XPHEnum
{
    Const Man = array("1",'男');
    Const Women = array("2",'女');

    function __construct(){
        $this->EnumTypes = array(self::Man,self::Women);
    }
}

//教师学生公共状态
class CommonIdentity extends XPHEnum
{
    Const Teacher = array('1','本校教师');
    Const Student = array('2','学生');
    Const OutsideTeacher = array('3','外校老师');
    
    function __construct(){
        $this->EnumTypes = array(self::Teacher,self::Student,self::OutsideTeacher);
    }
}

// dictype
class WebRole extends XPHEnum
{
    Const Admin = array("1",'超级管理员');
    Const Manage = array("2",'管理员');
    Const SchoolLeader = array('3','校领导');
    Const Sscientifictaff = array('4','科研处职员');
    Const BranchPresident = array('5','分院院长');
    Const BranchManage = array('6','分院管理员');
    Const Teacher = array('7','教师');
    function __construct(){
        $this->EnumTypes = array(self::Admin,self::Manage,self::SchoolLeader,self::Sscientifictaff,self::BranchPresident,self::BranchManage,self::Teacher);
    }
}

//用户类型
class AdminType extends XPHEnum
{
    Const Auth = array("1",'统一认证用户');
    Const SelfAdmin = array("2",'管理用户');

    function __construct(){
        $this->EnumTypes = array(self::Auth,self::SelfAdmin);
    }
}



// dictype
class DicType extends XPHEnum
{
    Const WebInfo = array("webInfo",'网站基础信息');
    function __construct(){
        $this->EnumTypes = array(self::WebInfo);
    }
}

// dickey
class DicKey extends XPHEnum
{
    Const WebTitle = array("webtitle",'网站标题','webInfo',null);
    Const KeyWords = array("keywords",'网站关键词','webInfo',null);
    Const Description = array("description",'网站描述','webInfo',null);

    function __construct(){
        $this->EnumTypes = array(self::WebTitle,self::KeyWords,self::Description);
    }
}

//专利系统身份
class PatentType extends XPHEnum
{
    Const Teacher = array("webtitle",'网站标题','webInfo',null);
    Const Student = array("keywords",'网站关键词','webInfo',null);

    function __construct(){
        $this->EnumTypes = array(self::Teacher,self::Student);
    }
}

//专利系统状态
class PatentSystemState extends XPHEnum
{
    Const UnAudit = array('1','已授权');
    Const Audit = array('2','已转让');
    Const Transfered = array('3','其他');
    
    function __construct(){
        $this->EnumTypes = array(self::UnAudit,self::Audit,self::Transfered);
    }
}


//成果类型
class ResultsType extends XPHEnum
{
    Const First = array('1','论文','a');
    Const Second = array('2','专著','b');
    Const Third = array('3','专利','c');
    Const Fourth = array('4','获奖','d');
    Const Fifth = array('5','研究报告、政策建议','e');
    Const Sixth = array('6','技术标准','f');
    Const Seventh = array('7','纵向课题','g');
    Const Eighth = array('8','横向课题','h');
    Const Ninth = array('9','科技转化情况','i');
    Const Tenth = array('10','举办、参加学术交流会、学会年会','j');
    Const Eleventh = array('11','学术报告情况','k');
    Const Twelfth = array('12','学术兼职情况','l');
    Const Thirteen = array('13','学科平台','m');
    
    function __construct(){
        $this->EnumTypes = array(self::First,self::Second,self::Third,self::Fourth,self::Fifth,self::Sixth,self::Seventh,self::Eighth,self::Ninth,self::Tenth,self::Eleventh,self::Twelfth,self::Thirteen);
    }
}

//文件类型
class FileType extends XPHEnum
{
    Const Img = array('1','图片');
    Const File = array('2','文件');
    
    function __construct(){
        $this->EnumTypes = array(self::Img,self::File);
    }
}


//审核类型
class AuditType extends XPHEnum
{
    Const Zero = array('0','考核');
    Const First = array('1','成果奖励');
    
    function __construct(){
        $this->EnumTypes = array(self::Zero,self::First);
    }
}



//考核等级
class examine_level extends XPHEnum
{
    Const Zero = array('0','国家');
    Const First = array('1','省部级');
    Const Second = array('2','厅局级');
    Const Third = array('3','校级');
    Const Fourth = array('4','其他');
    
    function __construct(){
        $this->EnumTypes = array(self::Zero,self::First,self::Second,self::Third,self::Fourth);
    }
}



//审核节点
class AuditNode extends XPHEnum
{
    Const First = array('1','分院审核');
    Const Second = array('2','科研处审核');
    
    function __construct(){
        $this->EnumTypes = array(self::First,self::Second);
    }
}

//审核状态
class AuditState extends XPHEnum
{
    Const UnAudit = array('0','未审核');
    Const Pass = array('1','审核通过');
    Const Refused = array('2','审核拒绝');
    
    function __construct(){
        $this->EnumTypes = array(self::UnAudit,self::Pass,self::Refused);
    }
}

//成果状态
class ResultState extends XPHEnum
{
    Const UnSubmit = array('0','未提交');
    Const Auditing = array('1','审核中');
    Const Fail = array('2','审核失败');
    Const Publiced = array('3','已公开');
    
    function __construct(){
        $this->EnumTypes = array(self::UnSubmit,self::Auditing,self::Fail,self::Publiced);
    }
}

class CommonDocument extends XPHEnum
{
    Const Excel = array("1",array('xls','XLS','xlsx','XLSX'),'excel.png');
    Const Pdf = array("2",array('pdf','PDF','Pdf','pDf','pdF','PDf','pDF'),'pdf.png');
    Const Word = array("3",array('docx','doc'),'word.png');
//    Const Img = array("4",array('png','PNG','Png','pNg','pnG','PNg','pNG','jpg','JPG','Jpg','jPg','jpG','JPg','jPG','jpeg','JPEG','Jpeg','jPeg','jpEg','jpeG','JPeg','jPEg','jpEG','JPEg','jPEG','gif','GIF','Gif','gIf','giF','GIf','gIF'),'img.png');
    Const Img = array("4",array('png','PNG','Png','jpg','JPG','Jpg','jpeg','JPEG','Jpeg','gif','GIF','Gif'),'img.png');
    Const Ppt = array("5",array('ppt','pptx'),'ppt.png');
    Const Text = array("6",array('txt'),'text.png');
    Const Php = array("7",array('php'),'php.png');

    function __construct(){
        $this->EnumTypes = array(self::Excel,self::Pdf,self::Word,self::Img,self::Ppt,self::Text,self::Php);
    }
}


//成果搜索类型
class SearchType extends XPHEnum
{
    Const Personal = array('1','个人查询');
    Const Dept = array('2','二级单位查询');
    Const School = array('3','校查询');
    
    function __construct(){
        $this->EnumTypes = array(self::Personal,self::Dept,self::School);
    }
}

//出版社级别
class PublisherLevel extends XPHEnum
{
    Const First = array('1','一级');
    Const Second = array('2','百佳');
    Const Third = array('3','其他');
    
    function __construct(){
        $this->EnumTypes = array(self::First,self::Second,self::Third);
    }
}

//刊物级别
class JournalLevel extends XPHEnum
{
    Const First = array('1','浙大一级','LZ1');
    Const Second = array('2','浙大核心','LZ2');
    Const Third = array('3','北大核心','LZ4');
    Const Fourth = array('4','其他','LZ8,LW8');
    Const Five = array('5','浙大一级2016修订版','LZ1');
    Const Six = array('6','浙大核心2016修订版','LZ2');  
    Const Seven = array('7','浙大一级2020版','LZ1');
    Const Eight = array('8','浙大核心2020版','LZ2');
    Const Ninth = array('9','南大核心2021-2022版','LZ3');
    Const Ten = array('10','北大核心2020版','LZ4');
    Const Eleven = array('11','权威期刊《中国社会科学》、《新华文摘》、《中国社会科学文摘》全文转载论文、《中国科学》期刊','LZ0');
    Const Twelve = array('12','知网收录期刊','LZ5');
    Const Thirteen = array('13','万方收录期刊','LZ6');
    Const Fourteen = array('14','维普收录期刊','LZ7');

    
    function __construct(){
        $this->EnumTypes = array(self::First,self::Second,self::Third,self::Fourth,self::Five,self::Six,self::Seven,self::Eight,self::Ninth,self::Ten,
        self::Eleven,self::Twelve,self::Thirteen,self::Fourteen);
    }
}


//论文类型
class PaperType extends XPHEnum
{
    Const Zero = array('0','中文核心','LZ8');
    Const First = array('1','中文普通','LZ8');
    Const Second = array('2','SCI','LW2');
    Const Third = array('3','EI期刊','LW4');
    Const Fourth = array('4','EI会议','LW7');
    Const Five = array('5','SSCI','LW3');
    Const Six = array('6','SCI会议','LW7');
    Const Seven = array('7','顶级期刊 外文Science 和 Nature论文','LW0');
    Const Eight = array('8','权威期刊 外文Science 和 Nature子刊','LW1');
    Const Ninth = array('9','HCI收录期刊','LW5');
    Const Ten = array('10','Scopus收录期刊','LW6');
    Const Eleven = array('11','其他','LW8');
    
    function __construct(){
        $this->EnumTypes = array(self::Zero,self::First,self::Second,self::Third,self::Fourth,self::Five,self::Six,self::Seven,self::Eight,self::Ninth,self::Ten,
        self::Eleven);
    }
}

//专著类别
class MonographType extends XPHEnum
{
    Const Zero = array('0','独著','ZD6');
    Const First = array('1','合著','ZH7');
    Const Second = array('2','专著','ZZ0');
    Const Third = array('3','编著','ZB1');
    Const Fourth = array('4','译著','ZY2');
    Const Five = array('5','画集','ZH3');
    Const Six = array('6','乐谱集','ZY4');
    Const Seven = array('7','书法集','ZS5');
    Const Eight = array('8','其他','ZQ8');

    
    function __construct(){
        $this->EnumTypes = array(self::Zero,self::First,self::Second,self::Third,self::Fourth,self::Five,self::Six,self::Seven,self::Eight);
    }
}

//经费系统课题类型
class ProjectType extends XPHEnum
{
    Const First = array('1','横向');
    Const Second = array('2','纵向');
    
    function __construct(){
        $this->EnumTypes = array(self::First,self::Second);
    }
}

//专利类型
class patent_type extends XPHEnum
{
    Const Zero = array('0','发明专利','ZL1');
    Const First = array('1','实用新型专利','ZL2');
    Const Second = array('2','外观设计专利','ZL3');
    Const Third = array('3','软件著作权','ZL4');
    Const Fourth = array('4','其他','ZL5');
    
    function __construct(){
        $this->EnumTypes = array(self::Zero,self::First,self::Second,self::Third,self::Fourth);
    }
}


//专利类型
class technical_type extends XPHEnum
{
    Const Zero = array('0','主持国家技术标准','JB1');
    Const First = array('1','参与国家技术标准','JB2');
    Const Second = array('2','主持省部级技术标准','JB3');
    Const Third = array('3','参与省部级技术标准','JB4');
    Const Fourth = array('4','主持厅局级技术标准','JB5');
    Const Five = array('5','参与厅局级技术标准','JB8');
    Const Six = array('6','企业技术标准','JB9');
    Const Seven = array('7','其他','JB0');
    
    function __construct(){
        $this->EnumTypes = array(self::Zero,self::First,self::Second,self::Third,self::Fourth,self::Five,self::Six,self::Seven);
    }
}


//横向纵向课题级别类型
class PortraitType extends XPHEnum
{
    Const Zero = array('0','国家级重大','XG1');
    Const First = array('1','国家级重点','XG2');
    Const Second = array('2','国家级一般','XG3');
    Const Third = array('3','省部级重大','XS1');
    Const Fourth = array('4','省部级重点','XS2');
    Const Five = array('5','省部级一般','XS3');
    Const Six = array('6','厅局级重大','XT1');
    Const Seven = array('7','厅局级重点','XT2');
    Const Eight = array('8','厅局级一般','XT3');
    Const Ninth = array('9','国际合作','XJ0');
    Const Ten = array('10','校级重大','XX1');
    Const Eleven = array('11','校级重点','XX2');
    Const Twelve = array('12','校级一般','XX3');
    Const Thirteen = array('13','横向课题','XH0');
    Const Fourteen = array('14','其他','XQ0');
    
    function __construct(){
        $this->EnumTypes = array(self::Zero,self::First,self::Second,self::Third,self::Fourth,self::Five,self::Six,self::Seven,self::Eight,self::Ninth,self::Ten,
        self::Eleven,self::Twelve,self::Thirteen,self::Fourteen);
    }
}

//2024年5月30号起之后的新数据的所属部门

class addDept extends XPHEnum
{   
    Const First = array('1','校领导','#FF8000','100');
    Const Second = array('2','校办公室','#40E0D0','101');
    Const Third = array('3','计划财务处','#DA70D6','102');
    Const Fourth = array('4','组织部(人才办)、宣传统战部','#32CD32','103');
    Const Fifth = array('5','人事处(教师工作部)、教师教学发展中心','#6495ED','105');
    Const Sixth = array('6','学生工作部(学生处)','#BA55D3','106');
    Const Seventh = array('7','教务处','#CD5C5C','107');
    Const Eighth = array('8','产教融合处','#FFA500','108');
    Const Ninth = array('9','科学技术处(科技合作处)','#87CEFA','109');
    Const Tenth = array('10','保卫处(人武部)','#FF69B4','111');
    Const Eleventh = array('11','招生就业处(校友办)','#a77a60','112');
    Const Twelve = array('12','继续教育学院','#502be7','114');
    Const Thirteen = array('13','资产管理处、采购中心','#1E90FF','115');
    Const Fourteen = array('14','图书馆','#87CEFA','117');
    Const Fifteen = array('15','信息技术中心','#1E90FF','118');
    Const Sixteen = array('16','工业设计基地','#1E90FF','119');
    Const Seventeen = array('17','后勤基建处','#1E90FF','120');
    Const Eighteen = array('18','纪委办','#1E90FF','122');
    Const Nineteen = array('19','质量管理处、审计处','#1E90FF','123');
    Const Twenty = array('20','国际交流与合作处、港澳台事务办公室','#1E90FF','124');
    Const TwentyOne = array('21','团委、创业学院','#1E90FF','125');
    Const TwentyTwo = array('22','工会、离退休办','#1E90FF','126');
    Const TwentyThree = array('23','越仕培训中心','#1E90FF','127');
    Const TwentyFour = array('24','发展规划处(高职教育研究所)','#1E90FF','129');
    Const TwentyFive = array('25','双高办公室','#1E90FF','130');
    Const TwentySix = array('26','设计与艺术学院（腾讯云国际互联网学院）','#1E90FF','203');
    Const TwentySeven = array('27','建筑工程学院','#1E90FF','205');
    Const TwentyEight = array('28','公共基础教学部（体育部）、马克思主义学院','#1E90FF','209');
    Const TwentyNine = array('29','财经学院','#1E90FF','213');
    Const thirty = array('30','商贸学院','#1E90FF','214');
    Const thirtyOne = array('31','交通学院','#1E90FF','215');
    Const thirtyTwo = array('32','鉴湖学院（纺织学院、黄酒学院、健康学院）','#1E90FF','216');
    Const thirtyThree = array('33','机电工程学院','#1E90FF','217');
    // Const thirtyFour = array('34','职能管理部','#1E90FF','303');
    Const thirtyFive = array('35','外单位','#1E90FF','304');
    
    function __construct()
    {
       $this->EnumTypes = array(self::First,self::Second,self::Third,self::Fourth,self::Fifth,self::Sixth,self::Seventh,self::Eighth,self::Ninth, self::Tenth,
       self::Eleventh,self::Twelve,self::Thirteen,self::Fourteen,self::Fifteen,self::Sixteen,self::Seventeen,self::Eighteen,self::Nineteen,self::Twenty,
       self::TwentyOne,self::TwentyTwo,self::TwentyThree,self::TwentyFour, self::TwentyFive,self::TwentySix,self::TwentySeven,self::TwentyEight,self::TwentyNine,self::thirty,
       self::thirtyOne,self::thirtyTwo,self::thirtyThree,  /* self::thirtyFour, */self::thirtyFive
        );
    }
}

/**
 *  2024-05-30之前的老数据所属单位
 */
class Dept extends XPHEnum
{   
        Const First = array('1','交通分院','#FF8000','215');
        Const Second = array('2','商贸分院','#40E0D0','214');
        Const Third = array('3','建筑工程分院','#DA70D6','205');
        Const Fourth = array('4','机械工程分院','#32CD32','300');
        Const Fifth = array('5','电气电子工程分院','#6495ED','301');
        Const Sixth = array('6','设计与艺术分院','#BA55D3','203');
        Const Seventh = array('7','财经分院','#CD5C5C','213');
        Const Eighth = array('8','鉴湖分院','#FFA500','216');
        Const Ninth = array('9','人文社科部','#87CEFA','302');
        Const Tenth = array('10','职能管理部','#FF69B4','303');
        Const Eleventh = array('11','外单位','#a77a60','304');
        Const Twelve = array('12','校领导','#502be7','100');
        Const Thirteen = array('13','机电分院','#1E90FF','217');
        Const Fourteen = array('14','公共基础教学部（体育部）、马克思主义学院','#f788ce','217');
        
        function __construct()
        {
            $this->EnumTypes = array(self::First,self::Second,self::Third,self::Fourth,
            self::Fifth,self::Sixth,self::Seventh,self::Eighth,self::Ninth,self::Tenth,
            self::Eleventh,self::Twelve,self::Thirteen,self::Fourteen
            );
        } 
}

